package com.eight;

import com.baomidou.mybatisplus.annotation.DbType;
import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
import com.github.pagehelper.PageInterceptor;
import org.apache.ibatis.plugin.Interceptor;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;
import springfox.documentation.swagger2.annotations.EnableSwagger2;

/**
 * @Description: 系统管理模块微服务（请在这里描述微服务的模块名字）
 * @Author: Van.Planifolia
 * @CreateTime: 2023-02-23  09:41
 * @Version: 1.0
 */
@SpringBootApplication(scanBasePackages = {"com.eight.aspect","com.eight.*"})
@EnableSwagger2
@EnableFeignClients
public class SystemMain {
    public static void main(String[] args) {
        SpringApplication.run(SystemMain.class, args);
    }
    @Bean
    public MybatisPlusInterceptor mybatisPlusInterceptor() {
        MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
        interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.MYSQL));
        return interceptor;
    }
}
